home *** CD-ROM | disk | FTP | other *** search
/ CU Amiga Super CD-ROM 19 / CU Amiga Magazine's Super CD-ROM 19 (1998)(EMAP Images)(GB)[!][issue 1998-02].iso / CUCD / Online / NNTPd / conf.h.dist < prev    next >
Text File  |  2002-12-08  |  14KB  |  511 lines

  1. /* $Id: conf.h.dist,v 1.8 1994/12/09 02:51:24 sob Exp sob $
  2.  * Configuration information for use by NNTP server and support
  3.  * programs.  Change these as appropriate for your system.
  4.  */
  5.  
  6. /*
  7.  * Compile time options.
  8.  */
  9.   
  10.  
  11. #undef    ALONE        /* True if we're running without inetd */
  12.  
  13. #ifdef ALONE
  14. #undef    FASTFORK        /* True if we don't want to read active file on start*/
  15. #endif
  16.  
  17. #define LOAD 5            /* Loadav above which server refuses connections */
  18. /*
  19.  * If you want the article array to be dynamically allocated instead of
  20.  * being fixed at a preset size, define DYNAMIC_ART_ARRAY.
  21.  */
  22. #define DYNAMIC_ART_ARRAY
  23.  
  24. #undef    BSD_42        /* 4.2 compatability code -- if this is defined, */
  25.             /* DBM probably wants to be defined as well. */
  26.  
  27. #undef BSD_43        /* Define if you are running on BSD 4.3 */
  28.  
  29. #define BSD_44        /* Define if you are running on BSD 4.4 */
  30.  
  31. #undef CMU_MACH        /* Use CMU's MACH ioctl(FIOCFSPARAM) for dfree(). */
  32.  
  33. #undef    USG        /* System V support */
  34.  
  35. #undef    SVR4        /* System V Release 4 support */
  36. #undef STREAMS_TLI    /* Use ioctl(I_STR) to implement ioctl(SIOCGIFCONF) */
  37. #undef SIZE_RETURNED_IN_BUFFER /* if a size integer is first in the buffer */
  38. #undef USE_STREAMS_DEVICE_FOR_IF_CONFIG /* to open /dev/ip rather a socket */
  39.  
  40. #undef TLI        /* Define this if you want to use TLI instead of */
  41.             /* sockets */
  42.  
  43. #define NDBM        /* Use new-style (4.3) ndbm(3x) libraries */
  44.  
  45. #undef    DBM        /* True if we want to use the old dbm(3x) libraries */
  46.             /* IF YOU DEFINE THIS, change CFLAGS in makefile to */
  47.             /* be -ldbm */
  48.  
  49. #undef    DBZ        /* True if we want to use dbz libraries */
  50.             /* IF YOU DEFINE THIS, change CFLAGS in makefile to */
  51.             /* be /usr/lib/dbz.o and install dbz.h */
  52.  
  53. #undef    USGHIST        /* Use USG style history file (no DBM) */
  54.             /* IF YOU DO NOT DEFINE NDBM or DBM, this is DEFAULT!*/
  55.  
  56. #undef CNEWS        /* define this if you are running C News */
  57. #undef CNEWS_CLEARTEXT    /* define this if you have a modern C News that handles
  58.                 input files ending in ".t" as cleartext */
  59. #undef BATCHED_INPUT    /* define if you want to support C News style 
  60.                 batched input (not supported by B-NEWS)  */
  61. #undef MSGID        /* define this if you want to run msgidd to keep
  62.                 track of recent msgids via daemon */
  63.  
  64. /* Vendor specific implementations */
  65. #undef LAI_TCP        /* Lachman Streams TCP/IP support (Xenix) */
  66. #undef EXCELAN        /* Excelan EXOS 205 support */
  67.  
  68. /* Things that vary in Unix variations */
  69. #undef U_LONG        /* Define this if your <sys/types.h> is missing */
  70.             /* typedefs for u_long */
  71. #define VOIDSIG        /* Newfangled signal() returns void, old returns int */
  72.  
  73. #undef MMAP        /* if your OS supports mmap() */
  74.  
  75. #undef DIRENT        /* If you have <dirent.h> define this */
  76.  
  77. /*
  78.  * If you DON'T have vfork, make this "#define vfork fork"
  79.  * vfork will speed up article transfer nntpds by about 2.5 times.
  80.  */
  81.  
  82. /* #define    vfork fork */
  83.  
  84. /* Controlling disk and inode consumption */
  85. #define MINFREE 4000    /* NNTP will not allow an XFER if there is less */
  86.             /* than this much diskspace (in blocks or kbytes) */
  87. #define POSTBUFFER 1000 /* NNTP will allow local posting until */
  88.             /* MINFREE-POSTBUFFER blocks or kbytes are left */
  89. /*#define MINFILES  MINFREE/4*/
  90.             /* NNTP will not allow an XFER if there is less */
  91.             /* than this many inodes on the SPOOLDIR filesystem */
  92. #undef SETPROCTITLE    /* if you want status visable via ps */
  93.  
  94. #undef    IHAVE_DEBUG    /* Copious debugging output from ihave */
  95.  
  96. /* Things that vary in network implementations */
  97. #define    SUBNET        /* If you have 4.3 subnetting */
  98. #undef    DAMAGED_NETMASK    /* If your subnet mask is not a multiple of */
  99.             /* four bits (e.g., UCSD) */
  100.  
  101. #undef    NETMASK        /* If you don't have subnet ioctls, define */
  102.             /* this to be a hex constant of your subnet */
  103.             /* mask, e.g., #define NETMASK 0xffffff00 */
  104.             /* Of course, you must define SUBNET above, too. */
  105. #undef    DECNET        /* If you want decnet support */
  106.  
  107. /*
  108.  * If you want C News batch files created that are not world writable,
  109.  * remove the comments from the UMASK line below. This does not apply
  110.  * if you are running BNEWS. At least, not yet. :-)
  111.  */
  112.  
  113. /* #define UMASK 022 */
  114.  
  115. /*
  116.  * If you have the syslog library routine, define SYSLOG to
  117.  * be the syslog facility name under which stats should be
  118.  * logged.  Newer 4.3 systems might choose LOG_NEWS;
  119.  * LOG_LOCAL7 is an acceptable substitute.
  120.  *
  121.  * If you don't have support for syslog, but want a facsimile,
  122.  * define FAKESYSLOG to be the name of a file to which to log stuff,
  123.  * then define SYSLOG and LOG, too.  e.g.,
  124.  *
  125.  *    #define    FAKESYSLOG    "/usr/lib/news/nntplog"
  126.  *
  127.  * If your host supports the BSD fdopen() function and the O_APPEND flag
  128.  * to open(), you should define FAKEAPPEND with FAKESYSLOG so that
  129.  * multiple copies of nntpd don't trash the log with buffered fprintf's.
  130.  *
  131.  * If you don't want any syslog-type activity, #undef SYSLOG.
  132.  * Obviously, this means that you can't define LOG, either.
  133.  */
  134.  
  135. /*#define FAKESYSLOG    "/usr/lib/news/nntplog"*/
  136. #undef    FAKEAPPEND
  137.  
  138. #define    SYSLOG    LOG_NEWS
  139.  
  140. #ifdef SYSLOG        /* Define LOG if you want copious logging info */
  141. #undef     LOG        /* undef it if you don't */
  142. #endif            /* but you can only have LOG if you have SYSLOG */
  143.  
  144. /*
  145.  * How long you want nntp servers to hang out without receiving
  146.  * commands before they close the connection with an error message.
  147.  *
  148.  * If you don't want any timeout, #undef it, i.e.,
  149.  *
  150.  *    #undef    TIMEOUT
  151.  *
  152.  * TIMEOUT should be at least two hours, which allows users some time
  153.  * away from their terminal (e.g., at lunch) while reading news.
  154.  */
  155.  
  156. #define    TIMEOUT    (2 * 3600)
  157.  
  158.  
  159. /*
  160.  * How long you want nntp servers to wait without receiving data
  161.  * during article transfers.  You CANNOT have XFER_TIMEOUT while
  162.  * running in standalone (ALONE) mode.
  163.  *
  164.  * If you don't want any transfer timeouts, #undef it, as above.
  165.  */
  166.  
  167. #ifndef ALONE
  168. #   define    XFER_TIMEOUT    (30 * 60)
  169. #endif
  170.  
  171. /* Various protocol extensions */
  172. #define    XHDR        /* Optional XHDR command.  Defining this will */
  173.             /* speed up '=' command in rn, but will load */
  174.             /* the server more.  If your server is heavily */
  175.             /* loaded already, defining this may be a bad idea */
  176. #define LISTGROUP    /* Optional LISTGROUP command to list article nums */
  177. #define XOVER        /* xover -- Return .overview data */
  178. #define OVER_XREFS    /* overview files have xref data in them */
  179. #define OVER_XREF_PREFIX /* the xref field (if present) includes xref: */
  180. #define OVER_FMT_FILE    "/usr/lib/news/overview.fmt"
  181.  
  182. /* Leave this undefined to indicate that overview files go in the spool
  183.  * directory.  However, if you want a separate hierarchy of overview
  184.  * files, define it here.
  185.  */
  186. /*#define OVERVIEW_DIR "/usr/spool/overviews"    /* base directory */
  187.  
  188. #define XROVER        /* xrover -- Return reference overview data */
  189.  
  190. /* Leave this undefined to indicate that ref-overview files go in the
  191.  * spool directory.  However, if you want a separate hierarchy of rover
  192.  * files, define it here.
  193.  */
  194. /*#define ROVER_DIR "/usr/spool/overviews"    /* base directory */
  195.  
  196. #undef XINDEX        /* Optional support for tin's index files */
  197. #define XINDEX_DIR    "/usr/spool/news/.index"
  198.  
  199. /* XTHREAD defines:  if XTHREAD is defined, THREAD_DIR controls where the
  200.  * thread files will be read from.
  201.  */
  202. #undef XTHREAD        /* Optional XTHREAD command.  This allows trn to
  203.              * keep all data on the server. */
  204.  
  205. /* Leave this undefined to indicate that thread files go in the spool
  206.  * directory.  However, if you want a separate hierarchy of thread files,
  207.  * define it here.
  208.  */
  209. /*#define THREAD_DIR    "/usr/spool/threads"        /* base directory */
  210.  
  211. /* if LONG_THREAD_NAMES & THREAD_DIR are defined, create threads in one dir */
  212. #undef LONG_THREAD_NAMES        /* not for short-name systems */
  213.  
  214. /*
  215.  * Person (user name) to post news as.
  216.  */
  217.  
  218. #define    POSTER        "usenet"
  219.  
  220. /*
  221.  * Define DOMAINMATCH if you want to use domain specifications in the 
  222.  * access list instead of just hostnames. See README for more information 
  223.  */
  224. #define DOMAINMATCH
  225.  
  226. /* Things that relate to authentication and access */
  227. /* Define AUTH to use the proposed NNTP Version 2 authentication protocol. */
  228. #define    AUTH    
  229.  
  230. #ifdef AUTH
  231. /* If defined, is directory containing generic authenticators. Since the
  232.  * client gets to choose what programs to be issued, this directory MUST
  233.  * NOT contain anything else but authenticators.
  234.  */
  235. /*#define GENAUTH     "/usr/lib/news/auth"    */
  236.  
  237. /* 
  238.  * the file where the nntpxmit site/userid/passwords are kept
  239.  * think (and PROTECT!) this file like L.sys, i.e., mode 600
  240.  */
  241. # define    PASSFILE    "/etc/nntp.sys"
  242. #endif
  243.  
  244. /*
  245.  * This file is where access information is stored
  246.  */
  247. #define ACCESS_FILE    "/usr/lib/news/nntp_access"
  248.  
  249. /*
  250.  * The file where the newgroup creation times are kept.  If you don't
  251.  * have C News or INN, you can run acttimes (see the support directory)
  252.  * to maintain an active.times file.
  253.  */
  254. #define ACTIVE_TIMES_FILE    "/usr/lib/news/active.times"
  255.  
  256. /*
  257.  * Some commonly used programs and files.
  258.  */
  259.  
  260. #define    ACTIVE_FILE    "/usr/lib/news/active"
  261. #define DISTRIBUTIONS_FILE    "/usr/lib/news/distributions"
  262. #define SUBSCRIPTIONS_FILE    "/usr/lib/news/subscriptions"
  263. #define NEWSGROUPS_FILE    "/usr/lib/news/newsgroups"
  264. #define HISTORY_FILE    "/usr/lib/news/history"
  265. #define    SPOOLDIR    "/usr/spool/news"
  266. #define INEWS        "/usr/lib/news/inews"
  267. #define RNEWS        "/usr/bin/rnews"        /* Link to inews? */
  268.  
  269. /*
  270.  * Support for C News style batching 
  271.  */
  272. #undef  NONEWSRUN        /* define this if you are using the daemon */
  273.                 /* version of relaynews */
  274. #ifdef NONEWSRUN
  275. #define TOOBIG 1L        
  276. #define TOOMANY 1
  277. #else
  278. #define TOOBIG 300000L        /* batch > TOOBIG bytes, kick rnews */
  279. #define TOOMANY 1024        /* batch > TOOMANY articles, kick rnews */
  280. #define NEWSRUN            "/usr/lib/newsbin/input/newsrun"
  281. #endif
  282. #define TOOOLD (5*60)        /* batch > TOOOLD seconds old, kick rnews */
  283. #define COPYSIZE 8192        /* bytes to copy at one time */
  284. #define MAXDIGITS 25        /* lg(maxlongint) + epsilon */
  285. #define MAXSTR 1024
  286. #define INDIR            "/usr/spool/news/in.coming"
  287. /* You may wish to delete the pathname from the front of BATCH_FILE */
  288. #define BATCH_FILE        "/usr/spool/news/in.coming/nntp.XXXXXX"
  289.  
  290. /************************************************************************/
  291. /* We don't recommend that you make changes in anything after this line */
  292. /************************************************************************/
  293.  
  294. #ifdef ultrix
  295. /* ultrix is not BSD_44 */
  296. #   ifdef BSD_44
  297. #     undef BSD_44
  298. #   endif
  299. #   ifdef __ultrix
  300. /* Ultrix 4.X is like BSD_43 */
  301. #     ifndef BSD_43
  302. #        define BSD_43
  303. #     endif
  304. /* Ultrix 4.X is not like BSD_42 */
  305. #     ifdef BSD_42
  306. #       undef BSD_42
  307. #     endif
  308. #  else
  309. /* Ultrix 3.X is not like BSD_43 */
  310. #     ifndef BSD_43
  311. #        undef BSD_43
  312. #     endif
  313. /* Ultrix 3.X is like BSD_42 */
  314. #     ifndef BSD_42
  315. #        define BSD_42
  316. #     endif
  317. #  endif /* not __ultrix */
  318. #endif
  319.  
  320. #ifndef BSD_44
  321. #if defined(__FreeBSD__) || defined(__386BSD__) || defined(bsdi)
  322. #define BSD_44
  323. #endif
  324. #endif
  325.  
  326. #if defined(__svr4__) || defined(_SYSTYPE_SVR4) || defined(__SVR4)
  327. #ifndef SVR4
  328. #define SVR4
  329. #endif
  330. #ifndef VOIDSIG
  331. #define VOIDSIG
  332. #endif
  333. #ifndef DIRENT
  334. #define DIRENT
  335. #endif
  336. #endif
  337.  
  338. /* for SunOS 4.X */
  339. #ifdef sun
  340. #   ifdef BSD_44
  341. #     undef BSD_44
  342. #   endif
  343. #   ifndef SVR4
  344. #     ifndef BSD_43
  345. #        define BSD_43
  346. #     endif
  347. #   endif
  348. #endif
  349.  
  350. #if defined(SVR4) || defined(hpux)
  351. #ifndef USG
  352. #define USG
  353. #endif
  354. #ifdef READ_SUPER
  355. #undef READ_SUPER
  356. #endif
  357. #ifdef BSD_42
  358. #undef BSD_42
  359. #endif
  360. #ifdef BSD_43
  361. #undef BSD_43
  362. #endif
  363. #ifdef BSD_44
  364. #undef BSD_44
  365. #endif
  366. #endif
  367.  
  368. #ifdef DBZ        /* If you use DBZ, then you need DBM as well. */
  369. #ifndef DBM
  370. #define DBM
  371. #endif /* DBM */
  372. #endif /* DBZ */
  373.  
  374. #ifdef BSD_42        /* This is a logical, warranted assumption */
  375. #   ifdef NDBM
  376. #       undef NDBM    /* which will probably get me in trouble. */
  377. #   endif
  378. #   ifndef DBM        
  379. #    define DBM    /* Kill it if you have 4.2 *and* ndbm.  */
  380. #   endif
  381. #   ifndef sun        /* not a sun */
  382. #       ifndef ultrix   /* not ultrix */
  383. #           ifndef CMU_MACH /* not CMU's Mach */
  384. #        ifndef NeXT /* not a NeXT */
  385. #                  ifndef READ_SUPER
  386. #                    define READ_SUPER /* read super block for space() */
  387. #            endif
  388. #               endif
  389. #           endif
  390. #       endif
  391. #   endif
  392. #endif /* BSD_42 */
  393.  
  394. #ifndef USG
  395. #    ifndef BSD_42
  396. #        ifndef CMU_MACH
  397. #            ifndef BSD_43
  398. #                ifndef BSD_44
  399. #                   define BSD_44
  400. #                endif
  401. #            endif
  402. #        endif
  403. #    endif
  404. #endif
  405.  
  406. #ifdef BSD_43        /* And now more assumptions! */
  407. #   ifndef sun
  408. #    ifndef __ultrix    /* Ultrix 4.0 or greater */
  409. #        ifndef mips    /* MIPS RISC/os */
  410. #        ifndef __osf__    /* DEC Alpha OSF1 */
  411. #            ifndef NeXT /* not a NeXT */
  412. #            ifndef READ_SUPER
  413. #                define READ_SUPER
  414. #            endif
  415. #            endif
  416. #        endif
  417. #        endif
  418. #    endif
  419. #   endif
  420. #endif
  421. #if defined(BSD_43) || defined(BSD_44)
  422. #       ifndef VOIDSIG
  423. #               define VOIDSIG
  424. #       endif
  425. #    ifndef DBZ
  426. #        ifndef DBM
  427. #            ifndef NDBM
  428. #                define NDBM
  429. #            endif
  430. #        endif
  431. #    endif
  432. #endif
  433.  
  434. #ifdef XTHREAD
  435. # ifdef THREAD_DIR
  436. #   ifdef LONG_THREAD_NAMES
  437. #    undef SUFFIX
  438. #   else
  439. #     ifndef SUFFIX
  440. #    define SUFFIX ".th"
  441. #     endif
  442. #   endif
  443. # else
  444. #   define THREAD_DIR    SPOOLDIR
  445. #   ifndef SUFFIX
  446. #     define SUFFIX    "/.thread"
  447. #   endif
  448. #   undef LONG_THREAD_NAMES
  449. # endif
  450. #endif
  451.  
  452. #ifdef XOVER
  453. # ifndef OVERVIEW_DIR
  454. #   define OVERVIEW_DIR SPOOLDIR
  455. # endif
  456. #endif
  457.  
  458. /*
  459.  * System V compatability
  460.  */
  461.  
  462. #ifdef USG
  463. # define    FCNTL            /* If O_etc is defined in <fcntl.h> */
  464. #define    vfork fork
  465. #ifdef dgux
  466. #define        FTRUNCATE
  467. #else
  468. #ifndef SVR4
  469. # define    NDIR            /* If you  need ndir library support */
  470. #endif
  471. #ifdef hpux
  472. #define        DIRSIZ_MACRO
  473. #endif
  474. #endif
  475.  
  476. # ifndef index
  477. #  define    index    strchr
  478. # endif
  479. # ifndef rindex
  480. #  define    rindex    strrchr
  481. # endif
  482. # ifndef bcopy
  483. #  define bcopy(s,d,l) memcpy((d),(s),(l))
  484. # endif
  485. # ifndef bcmp
  486. #  define bcmp(s,d,l)  memcmp((s),(d),(l))
  487. # endif
  488. # ifndef bzero
  489. #  define bzero(s,l)   memset((s),0,(l))
  490. # endif
  491. # ifdef U_LONG
  492.    typedef    unsigned long    u_long;
  493.    typedef    unsigned short    u_short;
  494. # endif
  495. # define    IPPORT_NNTP    119
  496. #endif /* USG */
  497.  
  498.  
  499. /*
  500.  * Some miscellaneous stuff you probably don't want to change.
  501.  */
  502.  
  503. #define    MAX_ARTICLES    4096        /* Maximum number of articles/group */
  504. #define READINTVL    60 * 10        /* 10 minutes b/n chking active file */
  505.  
  506. #ifdef VOIDSIG
  507. #   define SIGRET void
  508. #else
  509. #   define SIGRET int
  510. #endif
  511.